home *** CD-ROM | disk | FTP | other *** search
- CPP(1) Last changed: 4-27-99
-
-
- NNAAMMEE
- ccpppp - C language preprocessor
-
- SSYYNNOOPPSSIISS
- LLIIBBDDIIRR//ccpppp [[ _o_p_t_i_o_n || _f_i_l_e ]] ......
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- IRIX systems
-
- DDEESSCCRRIIPPTTIIOONN
- ccpppp is a K&R C language preprocessor (not an ISO/ANSI C language
- preprocessor) designed for standalone use and to be invoked as the
- first pass of all Fortran compilations and any K&R mode C compilation
- with the --mmpp option. Thus, the output of ccpppp is designed to be in a
- form acceptable as input to the next pass of the C compiler.
- Standalone use of ccpppp on C code is not recommended, because the
- functionality of ccpppp has been incorporated into the C compiler. See
- the mm44(1) man page for information on a more general macro processor.
-
- The ccpppp preprocessor does not recognize the ## operator (sometimes
- called the stringize operator), the #### operator (sometimes called the
- pasting operator), and the ##eelliiff command. There are other differences
- between this and ISO/ANSI C preprocessors.
-
- ccpppp optionally accepts any sequence of flags and input file names.
- The input files are processed in order; if no input file names are
- given, the standard input is used. The results of preprocessing the
- input file(s) are sent to the standard output.
-
- The following options are accepted by ccpppp:
-
- --PP Preprocess the input without producing the line control
- information used by the next pass of the C compiler.
-
- --CC By default, ccpppp strips C-style comments. If the --CC option is
- specified, all comments (except those found on ccpppp directive
- lines) are passed along.
-
- --MM Run only the macro preprocessor on the named C programs,
- requesting it to generate Makefile dependencies, and send the
- results to the standard output.
-
- --MMDDuuppddaattee _f_i_l_e_n_a_m_e
- Similar to the --MM option, but stores the resulting Makefile
- dependencies in _f_i_l_e_n_a_m_e rather than sending them to the
- standard output. ccpppp specified with the --MMDDuuppddaattee option
- updates only the lines in _f_i_l_e_n_a_m_e that end with a distinctive
- make comment and begin with the target name (as described
- under the --MMDDttaarrggeett option) followed by a colon.
-
- --MMDDttaarrggeett _n_a_m_e
- When the --MMDDuuppddaattee option has been specified, this option
- causes _n_a_m_e to be used as the target name for the first source
- file. By default, the target name for a source file is the
- same as the source file name with a ..oo suffix.
-
- --UU_n_a_m_e Remove any initial definition of _n_a_m_e, where _n_a_m_e is a
- reserved symbol that is predefined by the particular
- preprocessor. Following is the current list of these possibly
- reserved symbols. ccpppp predefines the ____EEDDGG, ssggii, uunniixx, and
- mmiippss symbols. The ____EEXXTTEENNSSIIOONNSS____ symbol is predefined to
- indicate this is not an ANSI ccpppp and to allow extensions in
- ANSI C include files. The compiler drivers, aass(1), cccc(1),
- CCCC(1), ppcc(1), and ff7777(1) predefine many other symbols during
- preprocessing.
-
- See their respective man pages for complete lists of the symbols that
- they define.
- --DD_n_a_m_e
- --DD_n_a_m_e=_d_e_f
- Define _n_a_m_e with value _d_e_f as if by a ##ddeeffiinnee. If no =_d_e_f is
- given, _n_a_m_e is defined with value 1. The --DD option has lower
- precedence than the --UU option. That is, if the same name is used
- in both a --UU options and a --DD option, the name will be undefined
- regardless of the order of the options.
-
- --II_d_i_r
- Change the algorithm for searching for ##iinncclluuddee files whose names
- do not begin with // to look in _d_i_r before looking in the
- directories on the standard list. Thus, ##iinncclluuddee files whose
- names are enclosed in double quotation marks ("") will be
- searched for first in the directory of the file with the ##iinncclluuddee
- line, then in the directories named in --II options, and last in
- directories on a standard list. For ##iinncclluuddee files whose names
- are enclosed in <>, the directory of the file with the ##iinncclluuddee
- line is not searched. If --II is specified with no _d_i_r, ccpppp is
- instructed to suppress the search of the standard list of include
- directories. This standard list consists only of //uussrr//iinncclluuddee.
-
- --mmaaxx__rreecc__ddeepptthh==_n_u_m
- Set the maximum nesting depth of calls to a single macro to _n_u_m.
- The default value is 300.
-
- Four special names are understood by ccpppp. The name ____LLIINNEE____ is
- defined as the current line number (as a decimal integer) as known by
- ccpppp, ____FFIILLEE____ is defined as the current file name (as a C string) as
- known by ccpppp, ____DDAATTEE____ is defined as a C string containing the current
- date (printed in the form "Dec 31 1999"), and ____TTIIMMEE____ is defined as a
- C string containing the current time in hh:mm:ss format. They can be
- used anywhere (including in macros) just as any other defined name.
-
- All ccpppp directive lines start with ## in column 1. Any number of
- blanks and tabs are allowed between the ## and the directive. The
- directives are:
-
- ##ddeeffiinnee _n_a_m_e _t_o_k_e_n-_s_t_r_i_n_g
- Replace subsequent instances of _n_a_m_e with _t_o_k_e_n-_s_t_r_i_n_g.
-
- ##ddeeffiinnee _n_a_m_e(( _a_r_g, ..., _a_r_g ) ttookkeenn--ssttrriinngg
- Note that there can be no space between _n_a_m_e and the (. Replace
- subsequent instances of _n_a_m_e followed by a (, a list of comma-
- separated sets of tokens, and a ) followed by _t_o_k_e_n-_s_t_r_i_n_g, where
- each occurrence of an _a_r_g in the _t_o_k_e_n-_s_t_r_i_n_g is replaced by the
- corresponding set of tokens in the comma-separated list. When a
- macro with arguments is expanded, the arguments are placed into
- the expanded _t_o_k_e_n-_s_t_r_i_n_g unchanged. After the entire _t_o_k_e_n-
- _s_t_r_i_n_g has been expanded, ccpppp restarts its scan for names to
- expand at the beginning of the newly created _t_o_k_e_n-_s_t_r_i_n_g.
-
- ##uunnddeeff _n_a_m_e
- Cause the definition of _n_a_m_e (if any) to be forgotten from now
- on. No additional tokens are permitted on the directive line
- after _n_a_m_e.
-
- ##iiddeenntt "_s_t_r_i_n_g"
- The _s_t_r_i_n_g and the directive are silently swallowed.
-
- No output is produced for this directive.
-
- ##pprraaggmmaa
- The directive and whatever follows it on the line is passed to
- the output in a slightly modified form which is not documented.
- The form may change in a future release.
-
- ##pprraaggmmaa oonnccee
- If this directive appears in an included file, the file will
- never be included again, even if there is another ##iinncclluuddee of
- this file. No tokens or comments are permitted after the oonnccee
- keyword. Using ##pprraaggmmaa oonnccee is more efficient than using macro
- wrappers, because the included file is not rescanned, however, it
- may not be portable to third-party preprocessors.
-
- ##iinncclluuddee "_f_i_l_e_n_a_m_e"
-
- ##iinncclluuddee <_f_i_l_e_n_a_m_e>
- Include, at this point, the contents of _f_i_l_e_n_a_m_e (which will then
- be run through ccpppp). When the <_f_i_l_e_n_a_m_e> notation is used,
- _f_i_l_e_n_a_m_e is only searched for in the standard places. See the --II
- option above for more detail. No additional tokens are permitted
- on the directive line after the final "" or >>.
-
- ##lliinnee _i_n_t_e_g_e_r-_c_o_n_s_t_a_n_t "_f_i_l_e_n_a_m_e"
- Causes ccpppp to generate line control information for the next pass
- of the C compiler. _i_n_t_e_g_e_r-_c_o_n_s_t_a_n_t is the line number of the
- next line and _f_i_l_e_n_a_m_e is the file from which it comes. If
- "_f_i_l_e_n_a_m_e" is not given, the current file name is unchanged. No
- additional tokens are allowed on the directive line after the
- optional _f_i_l_e_n_a_m_e.
-
- ##eennddiiff
- Ends a section of lines begun by a test directive (##iiff, ##iiffddeeff,
- or ##iiffnnddeeff). Each test directive must have a matching ##eennddiiff.
- No additional tokens are permitted on the directive line.
-
- ##iiffddeeff _n_a_m_e
- The lines following this directive will appear in the output only
- if _n_a_m_e has been the subject of a previous ##ddeeffiinnee without being
- the subject of an intervening ##uunnddeeff. No additional tokens are
- permitted on the directive line following _n_a_m_e.
-
- ##iiffnnddeeff _n_a_m_e
- The lines following this directive will appear in the output only
- if _n_a_m_e has not been the subject of a previous ##ddeeffiinnee. No
- additional tokens are permitted on the directive line after _n_a_m_e.
-
- ##iiff _c_o_n_s_t_a_n_t-_e_x_p_r_e_s_s_i_o_n
- Lines following this directive will appear in the output only if
- the _c_o_n_s_t_a_n_t-_e_x_p_r_e_s_s_i_o_n evaluates to non-zero. All binary non-
- assignment C operators, the ?: operator, the unary -, !, and ~
- operators are legal in _c_o_n_s_t_a_n_t-_e_x_p_r_e_s_s_i_o_n. The precedence of
- the operators is the same as defined by the C language. There is
- also a unary operator ddeeffiinneedd, which can be used in _c_o_n_s_t_a_n_t-
- _e_x_p_r_e_s_s_i_o_n in the following two forms: ddeeffiinneedd (( _n_a_m_e )) _o_r
- ddeeffiinneedd _n_a_m_e.. TThhiiss aalllloowwss tthhee uuttiilliittyy ooff ##iiffddeeff aanndd ##iiffnnddeeff iinn aa
- ##iiff ddiirreeccttiivvee.. OOnnllyy tthheessee ooppeerraattoorrss,, iinntteeggeerr ccoonnssttaannttss,, aanndd
- nnaammeess wwhhiicchh aarree kknnoowwnn bbyy ccpppp sshhoouulldd bbee uusseedd iinn _c_o_n_s_t_a_n_t-
- _e_x_p_r_e_s_s_i_o_n.. TThhee ssiizzeeooff ooppeerraattoorr iiss nnoott aavvaaiillaabbllee..
-
- TToo tteesstt wwhheetthheerr eeiitthheerr ooff ttwwoo ssyymmbboollss,, _f_o_o aanndd _f_u_m,, aarree ddeeffiinneedd,,
- uussee tthhee ffoolllloowwiinngg::
-
- #if defined(foo) || defined(fum)
-
- ##eellssee
- The lines following this directive will appear in the output only
- if the preceding test directive evaluates to zero. No additional
- tokens are permitted on the directive line.
-
- The test directives and the possible ##eellssee directives can be nested.
-
- FFIILLEESS
- _I_N_C_D_I_R Standard directory list for ##iinncclluuddee files, //uussrr//iinncclluuddee
-
- _L_I_B_D_I_R //uussrr//lliibb
-
- SSEEEE AALLSSOO
- cccc(1), lliinnee(1), mm44(1), uunniiffddeeff(1)
-
- This man page is available only online.
-